---
title: Bulk-raise claim tasks
summary: Raise one or more workflow tasks against claims in bulk.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks.Claim
reference_type: embedded
operation_id: OP-2
trigger: An application process needs to raise one or more workflow tasks against claims
---

# Bulk-raise claim tasks

Assembles many claim tasks through `clsClaimTaskGenerator` and persists them as one collection.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-2 |
| **Trigger** | An application process needs to raise one or more workflow tasks against claims |
| **Inputs** | Text, optional assignee mailid, optional due date/offset, priority enum, claim category, notepad-required flag |
| **Outputs** | Tasks queued in the inner collection, persisted on `Save()` |
| **Primary components** | `clsClaimTaskGenerator.AddTask`, `clsClaimTaskGenerator.NewTask`, `clsClaimTaskGenerator.Save` |
| **Entry point** | `SAIF.Business.Tasks.Claim/clsClaimTaskGenerator.vb` |

## Steps

1. Construction: store DPI, resolve default claim (by `ClaimID`, claim number, or `clsClaimData`), create the inner collection via `clsClaimTaskCollection.NewTaskCollection(dpi)`, and default `m_CreateUser` to `dpi.UserID` when not supplied ([BR-GEN-04](../business-rules.md#br-gen-04-default-create-user-is-the-data-portal-user)).
2. `AddTask(...)` overloads normalize the due date before delegating: no-date overloads use `clsSmartDate(Today).NextWorkDay`; date overloads substitute `NextWorkDay` when the supplied date is not a working day; offset overloads use `NextWorkDay(offset, NonWorkDayOption.PreviousWorkDay, False)` ([BR-GEN-02](../business-rules.md#br-gen-02-generated-task-due-date-normalized-to-a-working-day)).
3. Private `NewTask(...)`: if `inClaimID = 0`, throw `ApplicationException("ClaimID not specified")` ([BR-GEN-01](../business-rules.md#br-gen-01-generated-task-must-specify-a-claim)).
   - On failure: creation aborts with the exception.
4. Create the task via `clsClaimTask.NewTask(collection criteria DPI, inClaimID, m_CreateUser)`.

   > **Origin**: This step invokes [Create a claim task](op-1-create-claim-task.md), which builds and enriches the claim task.
5. If no assignee was supplied, resolve one: `ClaimServices.GetResponsibleAdjuster(dpi, inClaimID)` when no `clsClaimData` is cached, otherwise `m_ClaimData.AdjusterMailID` ([BR-GEN-03](../business-rules.md#br-gen-03-default-assignee-is-the-responsible-adjuster)).
6. If `inNotePadRequired`, set `setNotePadFlag = "Y"` (marks the task dirty and makes `RequiresNotePadEntry` true).
7. If a `clsClaimData` is cached, copy `PolicyNumber` onto the task.
8. Assign `MailID` (triggers [BR-CT-03](../business-rules.md#br-ct-03a-assignee-validation-exemptions)/[BR-CT-06](../business-rules.md#br-ct-06-external-rtw-user-must-be-assigned-to-the-claim) via `CheckRules("TaskUser")`), `Text` (sanitized, triggers [BR-CT-04](../business-rules.md#br-ct-04-task-text-is-required)/[BR-CT-05](../business-rules.md#br-ct-05-task-text-length-limit)), `PriorityCode` (from `GetPriorityText`), `TaskDate`.
9. Set `CategoryCode` to `FSTRK` for `ClaimCategories.FastTrack`, otherwise `CLMM` ([BR-CT-10](../business-rules.md#br-ct-10-claim-tasks-default-to-the-manage-claims-category)).
10. Register the extra rule `IsValidClaimID` on the task instance ([BR-GEN-05](../business-rules.md#br-gen-05-generated-tasks-claim-must-resolve-to-a-valid-claim-record)) and add the task to the inner collection.
11. `Save()` forwards to `m_Collection.Save()` — the base collection applies edits and persists each task through the inherited stored-procedure path.

   > **Origin**: Persistence is implemented by [SAIF.Business.Tasks](../../saif-business-tasks/overview.md); step 11 is the inherited task collection save path.

## Process flow

```mermaid
flowchart TD
	Start([AddTask called]) --> Norm[Normalize due date]
	Norm --> Check{ClaimID = 0?}
	Check -->|Yes| Err([ApplicationException])
	Check -->|No| NewTask[Create claim task]
	NewTask --> Assignee{Assignee supplied?}
	Assignee -->|No| Resolve[Resolve responsible adjuster]
	Assignee -->|Yes| SetFields["Set MailID, Text, Priority,<br>Category"]
	Resolve --> SetFields
	SetFields --> Register[Register IsValidClaimID rule]
	Register --> Add[Add to inner collection]
	Add --> Save([Save persists collection])
```

## Failure and edge-case behavior
- Missing claim ID: `ApplicationException("ClaimID not specified")`.
- Rule failures surface through `IsValid`/`ErrorMessages` rather than exceptions.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- SAIF.Business.Tasks.Claim/clsClaimTaskGenerator.vb
